/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package me.oz.test.api;

import com.donkeylive.qw.po.User;
import io.reactivex.Observable;
import me.oz.test.vo.UserVo;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 *
 * @author oz
 */
public interface IUserService {
    
    @PUT("test")
    Observable<ResultMessage> updateUser(@Header("userid") String userid, @Body User bean);
    
    
    @GET("test/getUser")
    Observable<User> getUser4(@Query(value = "userid",encoded = true) UserVo vo);
    
    @GET("test/{userid}")
    Observable<User> getUser3(@Path("userid") int userid);
    
    
    @GET("user")
    Observable<User> getUser(@Header("userid") String userid);
    
    /**
     *
     * @param userid
     * @return
     */
    @GET("user")
    Call<User> getUser2(@Header("userid") String userid);
    
}
